//
//  ViewController.swift
//  MultiSelectView
//
//  Created by Chris on 2021/4/29.
//

import UIKit

class ViewController: UIViewController {

    private var models = Array<TestModel>()
    override func viewDidLoad() {
        super.viewDidLoad()
        initUI()
    }

    func initUI() {
        let width = UIScreen.main.bounds.width
        let height = UIScreen.main.bounds.height
        for i in 1...30 {
            let model = TestModel()
            model.title = String(i)
            models.append(model)
        }
        let v = MultiSelectView.init(CGRect.init(x: 0, y: 0, width: width, height: height), models, self)
        view.addSubview(v)
    }

}

extension ViewController: MultiSelectViewDelegate {
    func selectRangeChanged(_ startIndex: Int, _ endIndex: Int, _ completed: Bool) {
        print("startIndex -> \(startIndex)  endIndex -> \(endIndex)  completed ->  \(completed)")
    }


}

